﻿using DapperExtensions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RightControl.Model {

    [Table("platform_auth")]
    /// <summary>
    /// 平台授权
    /// </summary>
    public class PlatformAuth : Entity {
        public int UserId { get; set; }

        /// <summary>
        /// 适用平台 1:Amazon  2:Wish 3:敦煌
        /// </summary>
        public int PlatForm { get; set; }

        /// <summary>
        /// 卖家编号
        /// </summary>
        public string MerchantId { get; set; }

        /// <summary>
        /// 授权Token
        /// </summary>
        public string AuthToken { get; set; }

        public string ShopName { get; set; }

        public string UserAccount { get; set; }

        public string RefreshToken { get; set; }

        /// <summary>
        /// token过期时间
        /// </summary>
        public DateTime ExpireTime { get; set; }

        public PlatformAuth() { }

        public PlatformAuth(int userId, int platForm) {
            UserId = userId;
            PlatForm = platForm;
            CreateBy = userId;
            UpdateBy = userId;
        }
    }
}
